package gwt.server.util;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.context.ServletContextAware;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * Created by swootton on 10/04/14.
 */

public abstract class BaseServiceImpl extends RemoteServiceServlet implements Controller, ServletContextAware {

    private static final long serialVersionUID = -947387287029228608L;

    private ServletContext servletContext;

    @Override
    public final ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse resp) throws Exception { // NOSONAR
        doPost(req, resp);
        return null;
    }


    public ServletContext getServletContext() {
        return servletContext;
    }


    public void setServletContext(ServletContext servletContext) {
        this.servletContext = servletContext;
    }
}